﻿@model DiplomaWeb.Models.OrderDiplom.ConsultantsForOrderViewModel
@foreach (var item in Model.ConsultantsInOrder)
{
    <div style="margin-top: 10px; margin-bottom: 10px;">
        @if (Model.Edite)
        {
            <a href="@Url.RouteUrl("Default", new {action = "RemoveConsultantForOrder", controller = "OrderDiplom", orderId = Model.OrderId, consultantId = item.Id.ToString()})">[X]</a>
        }
        @item.Text
    </div>
}
@if (Model.Edite)
{
    using (Html.BeginRouteForm("Default", new { controller = "OrderDiplom", action = "AddConsultantForOrder" }, FormMethod.Post))
    {
        @Html.Hidden("orderId", Model.OrderId)
        @Html.DropDownList("consultantId", Model.ConsultantOfPartsList)
        <input type="submit" value="Add" />
    }
}